#pragma once


// CDlgBuffEdit dialog

class CDlgBuffEdit : public CDialogEx
{
	DECLARE_DYNAMIC(CDlgBuffEdit)

public:
	CDlgBuffEdit(CWnd* pParent = NULL);   // standard constructor
	virtual ~CDlgBuffEdit();

// Dialog Data
	enum { IDD = IDD_DLG_BUFF_EDIT };

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	DECLARE_MESSAGE_MAP()

private :
	int										m_nCurrentSelectedIndex;

private :
	void			_RefreshBuffList		( int nSelectIndex );
	void			_ClearBuffList			( void );
	
	void			_InitBuffType			( void );
	void			_SelectBuff				( int nSelectIndex );
	
	CString			_GetStringFromList		( int nIndex );

	int				_GetBuffID				( int nIndex );
	CString			_GetBuffName			( int nIndex );
	int				_GetBuffType			( int nIndex );
	__int64			_GetBuffDuration		( int nIndex );
	float			_GetBuffValue			( int nIndex );

	int				_ReadBuffID				( void );
	CString			_ReadBuffName			( void );
	int				_ReadBuffType			( void );
	__int64			_ReadBuffDuration		( void );
	float			_ReadBuffValue			( void );

	void			_RefreshBuffID			( int nID );
	void			_RefreshBuffName		( CString strName );
	void			_RefreshBuffType		( int eType );
	void			_RefreshBuffDuration	( __int64 nDuration );
	void			_RefreshBuffValue		( float fValue );



public:
	afx_msg void OnBnClickedBtnBuffSave();
	afx_msg void OnBnClickedBtnBuffDelete();
	afx_msg void OnCbnSetfocusComboBuffType();
	afx_msg void OnBnClickedBtnBuffLoad();
	afx_msg void OnLbnSelchangeListBuff();
};
